﻿// ***********************************************************************
// Assembly         : MVC4Portal
// Author           : LJO+01 (Laurent Jordi)
// Created          : 06-05-2013
// Last Modified By : LJO+01 (Laurent Jordi)
// Last Modified On : 06-05-2013
// ***********************************************************************
// <copyright file="ContentAccessor_MetaModel.cs" company="Copyright © Innovacall 2011">
//     Copyright (c) Copyright © Innovacall 2011. All rights reserved.
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace InnovaApp.Portals.MVC4Portal.Models.MetaModels
{
    /// <summary>
    /// Model designed to define witch controller will treat the client request
    /// </summary>
    public class ContentAccessor_MetaModel
    {
        /// <summary>
        /// Address requested
        /// </summary>
        /// <value>The friendly URL.</value>
        public string FriendlyUrl { get; set; }
        /// <summary>
        /// Language
        /// </summary>
        /// <value>The language.</value>
        public string Language { get; set; }
        /// <summary>
        /// Controller in charge of the treatment
        /// </summary>
        /// <value>The controller.</value>
        public string Controller { get; set; }
        /// <summary>
        /// Controller action
        /// </summary>
        /// <value>The action.</value>
        public string Action { get; set; }
        /// <summary>
        /// Parent menu id (parent of parent of LayoutMenu_Translation)
        /// </summary>
        /// <value>The layout menu id.</value>
        public int LayoutMenuId { get; set; }
        /// <summary>
        /// Structure page Id corresponding to Direct URL
        /// </summary>
        /// <value>The structure page id.</value>
        public int StructurePageId { get; set; }
        /// <summary>
        /// Tag contenant le message à afficher à l'ouverture de la page
        /// </summary>
        /// <value>The opening message resource tag.</value>
        public string OpeningMessageResourceTag { get; set; }
        /// <summary>
        /// Nom de la ressource contenant le message à afficher à l'ouverture de la page
        /// </summary>
        /// <value>The opening message resource string format parameters.</value>
        public string[] OpeningMessageResourceStringFormatParameters { get; set; }
        /// <summary>
        /// Constructeur neutre (interdit)
        /// </summary>
        /// <exception cref="System.NotSupportedException"></exception>
        public ContentAccessor_MetaModel()
        {
            throw new NotSupportedException();
        }
        /// <summary>
        /// Constructeur standard, pas de message à l'ouverture de la page
        /// </summary>
        /// <param name="friendlyUrl">The friendly URL.</param>
        /// <param name="controller">The controller.</param>
        /// <param name="action">The action.</param>
        /// <param name="language">The language.</param>
        /// <param name="layoutMenuId">The layout menu id.</param>
        /// <param name="structurePageId">The structure page id.</param>
        public ContentAccessor_MetaModel(string friendlyUrl, string controller, string action, string language, int layoutMenuId, int structurePageId)
        {
            this.FriendlyUrl = friendlyUrl;
            this.Controller = controller;
            this.Action = action;
            this.Language = language;
            this.LayoutMenuId = layoutMenuId;
            this.StructurePageId = structurePageId;
            this.OpeningMessageResourceTag = string.Empty;
            this.OpeningMessageResourceStringFormatParameters = null;
        }
        /// <summary>
        /// Constructeur permettant l'affichage d'un message à l'ouverture de la page
        /// </summary>
        /// <param name="friendlyUrl">The friendly URL.</param>
        /// <param name="controller">The controller.</param>
        /// <param name="action">The action.</param>
        /// <param name="language">The language.</param>
        /// <param name="layoutMenuId">The layout menu id.</param>
        /// <param name="structurePageId">The structure page id.</param>
        /// <param name="openingMessageResourceTag">The opening message resource tag.</param>
        /// <param name="openingMessageResourceStringFormatParameters">The opening message resource string format parameters.</param>
        public ContentAccessor_MetaModel(string friendlyUrl, string controller, string action, string language, int layoutMenuId, int structurePageId, string openingMessageResourceTag, string[] openingMessageResourceStringFormatParameters)
        {
            this.FriendlyUrl = friendlyUrl;
            this.Controller = controller;
            this.Action = action;
            this.Language = language;
            this.LayoutMenuId = layoutMenuId;
            this.StructurePageId = structurePageId;
            this.OpeningMessageResourceTag = openingMessageResourceTag;
            this.OpeningMessageResourceStringFormatParameters = openingMessageResourceStringFormatParameters;
        }
    }
}